home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 1.iso
/
ARGONET
/
PD
/
PROGRAMMING
/
DESKLIBC
/
SOURCES.ZIP
/
DeskLib
/
!DLSources
/
Libraries
/
Coord
/
c
/
PtInRect
< prev
next >
Wrap
Text File
|
1995-07-09
|
1KB
|
31 lines
/*
#### # # # #
# # # # # The FreeWare C library for
# # ## ### # # # # ### RISC OS machines
# # # # # # # # # # # ___________________________________
# # #### ### ## # # # #
# # # # # # # # # # Please refer to the accompanying
#### ### #### # # ##### # ### documentation for conditions of use
________________________________________________________________________
File: Coord.PtInRect.c
Author: Copyright © 1992 Edouard Poor
Version: 1.01 (13 Jul 1993)
Purpose: Check if a point lies within a rectangle
*/
#include "DeskLib:Core.h"
#include "DeskLib:Wimp.h"
#include "DeskLib:Coord.h"
BOOL Coord_PointInRect(wimp_coord *point, wimp_rect *rectangle)
{
if(point->x < rectangle->min.x) return(FALSE);
if(point->x > rectangle->max.x) return(FALSE);
if(point->y < rectangle->min.y) return(FALSE);
if(point->y > rectangle->max.y) return(FALSE);
return(TRUE);
}